#pragma once
#include "DXAMLCommon.h"
#include "CFrameworkElement.h"

class CString;

class CTextBlock :
	public CFrameworkElement
{

//private: 
//	CTextBlock(CCoreServices * pCore);
//private: 
//	virtual ~CTextBlock();
//
//public: 
//	CString * m_pText;
//	CInlineCollection * m_pInlines;
//	enum TextWrapping m_textWrapping;
//	enum TextTrimming m_textTrimming;
//	enum TextAlignment m_textAlignment;
//	struct XRECTF_RB m_padding;
//
//	XFLOAT m_eLineHeight;
//	enum LineStackingStrategy m_lineStackingStrategy;
//	IFontCollection * m_pFontCollection;
//	XUINT32 m_isTextSelectionEnabled;
//	static HRESULT Create(CDependencyObject * * ppObject, CREATEPARAMETERS * pCreate);
//	virtual XUINT32 GetTypeIndex() const;
//	virtual XUINT32 ShouldRender();
//	virtual HRESULT EnterImpl(CDependencyObject * pNamescopeOwner, struct EnterParams params);
//	virtual HRESULT LeaveImpl(CDependencyObject * pNamescopeOwner, struct LeaveParams params);
//	virtual HRESULT GetValue(CDependencyProperty * pdp, CValue * pValue);
//	virtual HRESULT SetValue(CDependencyProperty * pdp, CValue * pValue);
//	virtual HRESULT PullInheritedTextFormatting();
//	virtual HRESULT SetCharacters(XUINT32 cCharacters, XUINT16 * pCharacters);
//	virtual HRESULT AddText(XUINT32 cCharacters, XUINT16 * pCharacters, enum RunFlags flags);
//	virtual XINT32 CanHaveChildren();
//	virtual XUINT32 GetIsLayoutElement();
//	virtual HRESULT GetActualWidth(XFLOAT * peWidth);
//	virtual HRESULT GetActualHeight(XFLOAT * peHeight);
//	virtual HRESULT GetBoundingRectangle(struct XRECTF_WH * pRect);
//	HRESULT GetTextFormatter(RichTextServices::TextFormatter * * ppTextFormatter);
//	void ReleaseTextFormatter(RichTextServices::TextFormatter * pTextFormatter);
//	struct ITextContainer * GetTextContainer() const;
//	struct ITextView * GetTextView() const;
//	BlockNode * GetPageNode() const;
//	CFontContext * GetFontContext();
//	HRESULT GetBaselineOffset(XFLOAT * pBaselineOffset);
//	HRESULT OnContentChanged(CDependencyObject * pElement, CDependencyProperty * pdp);
//	virtual XUINT32 IsFocusable();
//	virtual XUINT32 IsFocused();
//	virtual HRESULT UpdateFocusState(enum FocusState focusState);
//	HRESULT SelectAll();
//	TextSelectionManager * GetSelectionManager();
//	static HRESULT GetSelectedText(struct Xcp_IDependencyObject * pObject, XUINT32 cArgs, CValue * ppArgs, CValue * pResult);
//	HRESULT GetContentStart(CTextPointerWrapper * * ppTextPointerWrapper);
//	HRESULT GetContentEnd(CTextPointerWrapper * * ppTextPointerWrapper);
//	HRESULT GetSelectionStart(CTextPointerWrapper * * ppTextPointerWrapper);
//	HRESULT GetSelectionEnd(CTextPointerWrapper * * ppTextPointerWrapper);
//	HRESULT Select(CTextPointerWrapper * pAnchorPosition, CTextPointerWrapper * pMovingPosition);
//	HRESULT OnSelectionChanged(XUINT32 previousSelectionStartOffset, XUINT32 previousSelectionEndOffset, XUINT32 newSelectionStartOffset, XUINT32 newSelectionEndOffset);
//	HRESULT OnSelectionVisibilityChanged(XUINT32 selectionStartOffset, XUINT32 selectionEndOffset);
//	void InvalidateRender();
//protected: 
//	virtual HRESULT MeasureOverride(struct XSIZEF availableSize, struct XSIZEF & desiredSize);
//	virtual HRESULT ArrangeOverride(struct XSIZEF finalSize, struct XSIZEF & newFinalSize);
//	virtual HRESULT RaiseIsRightToLeftChangedEvent(CValue * pValue);
//	virtual HRESULT MarkInheritedPropertyDirty(CDependencyProperty * pdp, CValue * pValue);
//private: 
//	BlockLayoutEngine * m_pBlockLayout;
//	BlockNode * m_pPageNode;
//	CFontContext * m_pFontContext;
//	enum FocusState m_focusState;
//	TextBlockView * m_pTextView;
//	TextSelectionManager * m_pSelectionManager;
//	HRESULT EnsureFontContext();
//	HRESULT EnsureBlockLayout();
//	HRESULT GetMaxLayoutSize(struct XSIZEF *);
//	HRESULT EnsureTextSelectionManager();
//	HRESULT CreateInlines();
//	void InvalidateContent();
//	void InvalidateContentMeasure();
//	void InvalidateContentArrange();
//	virtual HRESULT InitInstance();
//	virtual struct Xcp_IAutomationPeer * OnCreateAutomationPeerImpl();
//	HRESULT OnSelectionEnabledChanged(XUINT32 oldValue);
//	HRESULT RaiseSelectionChangedEvent();
//	HRESULT RenderSelectionEdgeStores(XUINT32 isHighContrast, const struct SharedRenderParams & sharedRP, const struct NWRenderParams & nwRP, XUINT32 highlightRectCount, struct XRECTF_WH * pHighlightRects, xvector<xref_ptr<CRasterizerEdgeStore> > & vecEdgeStores);
//	HRESULT HWRenderSelection(XUINT32 isHighContrast, xvector<HWInstance *> * pRenderData, const struct HWRenderParams & rp, XUINT32 highlightRectCount, struct XRECTF_WH * pHighlightRects);
//protected: 
//	virtual HRESULT NWRenderPreChildrenEdgesVirtual(const struct SharedRenderParams & sharedRP, const struct NWRenderParams & nwRP, xvector<xref_ptr<CRasterizerEdgeStore> > & vecEdgeStores);
//	virtual HRESULT NWRenderPostChildrenEdgesVirtual(const struct SharedRenderParams & sharedRP, const struct NWRenderParams & nwRP, xvector<xref_ptr<CRasterizerEdgeStore> > & vecEdgeStores);
//	virtual XUINT32 NWCanApplyOpacityWithoutLayer();
//public: 
//	HRESULT HWRenderContent(xvector<HWInstance *> * pRenderData, const struct HWRenderParams & rp, SolidColorBrushClone * pBrushClone);
//	HRESULT HWPostChildrenRender(xvector<HWInstance *> * pRenderData, const struct HWRenderParams & rp, SolidColorBrushClone * pBrushClone);
//	virtual void GetIndependentlyAnimatedBrushes(CSolidColorBrush * * ppFillBrush, CSolidColorBrush * * ppStrokeBrush);
//protected: 
//	virtual HRESULT D2DPreChildrenRenderVirtual(const struct SharedRenderParams & sharedRP, const struct D2DRenderParams & d2dRP);
//	virtual HRESULT D2DPostChildrenRenderVirtual(const struct SharedRenderParams & sharedRP, const struct D2DRenderParams & d2dRP);
//	virtual HRESULT D2DHitTestSelf(struct XPOINTF ptHit, CUIElement * * ppResult);
//	virtual HRESULT D2DComputeInnerBounds(struct XRECTF_RB * pInnerBounds);
//	virtual HRESULT D2DEnsureResources(const struct D2DPrecomputeParams & cp, const CMILMatrix * pMyAccumulatedTransform);
//	virtual HRESULT PreChildrenPrintVirtual(const struct SharedRenderParams & sharedPrintParams, const struct D2DPrecomputeParams & cp, const struct D2DRenderParams & printParams);
//	virtual HRESULT PostChildrenPrintVirtual(const struct SharedRenderParams & sharedPrintParams, const struct D2DPrecomputeParams & cp, const struct D2DRenderParams & printParams);
//	virtual HRESULT GenerateContentBounds(struct XRECTF_RB * pBounds);
//	virtual HRESULT HitTestLocalInternal(const HitTestPolygon & target, XUINT32 * pHit);
//	virtual HRESULT HitTestLocalInternal(const struct XPOINTF & target, XUINT32 * pHit);
//	virtual HRESULT OnPointerMoved(struct Xcp_IDependencyObject * pEventArgs);
//	virtual HRESULT OnPointerPressed(struct Xcp_IDependencyObject * pEventArgs);
//	virtual HRESULT OnPointerReleased(struct Xcp_IDependencyObject * pEventArgs);
//	virtual HRESULT OnGotFocus(struct Xcp_IDependencyObject * pEventArgs);
//	virtual HRESULT OnLostFocus(struct Xcp_IDependencyObject * pEventArgs);
//	virtual HRESULT OnTapped(struct Xcp_IDependencyObject * pEventArgs);
//	virtual HRESULT OnRightTapped(struct Xcp_IDependencyObject * pEventArgs);
//	virtual HRESULT OnDoubleTapped(struct Xcp_IDependencyObject * pEventArgs);
//	virtual HRESULT OnKeyUp(struct Xcp_IDependencyObject * pEventArgs);
//	virtual HRESULT OnKeyDown(struct Xcp_IDependencyObject * pEventArgs);

};
